package org.example.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.poi.hpsf.Decimal;

import java.util.Date;

@TableName("user")
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class User {

    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Integer id;

    @TableField("username")
    private String username;


    @TableField("password")
    private String password;

    @TableField("phone")
    private String phone;

    @TableField("code")
    private String code;

    @TableField("avatar_url")
    private String avatarUrl;

    @TableField("sex")
    private Integer sex;

    @TableField("membership_level")
    private String membershipLevel;

    @TableField("account_balance")
    private Integer accountBalance;


    @TableField("register_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date registerTime;


    @TableField("last_login_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date lastLoginTime;


}
